<template>
  <van-sticky>
    <!-- 头部导航 -->
    <van-nav-bar title="我的交易" left-text="返回" left-arrow @click-left="toPersonalView">
      <!-- 页面导航 跳转页面-->
    </van-nav-bar>
  </van-sticky>
  <van-tabs v-model:active="activeName">
    <van-tab title="我发布的" name="mytrade">
      <div>
        <Fabu></Fabu>
      </div>
    </van-tab>
    <van-tab title=" 我卖出的" name="selled">
      <div>
        <Selled></Selled>
      </div>
    </van-tab>

    <van-tab title="售后" name="returnorder">
      <div>
        <Buy></Buy>
      </div>
    </van-tab>
  </van-tabs>
</template>

<script setup>
import { useRouter } from 'vue-router'; //路由器
// 返回上一页面
import { ref } from 'vue';
import Fabu from '../components/Fabu.vue';
import Selled from '../components/Selled.vue';
import Buy from '../components/Buy.vue';
// const onClickLeft = () => history.back();
const router = useRouter(); //获取到 router 对象，用于编程式跳转导航
const activeName = ref('mytrade');
function toPersonalView() {
  router.push("/personal");
}

</script>
  
<style scoped lang="css">
.goods-card {
  margin: 0;
  background-color: white;
}

.delete-button {
  height: 100%;
}

a:visited {
  color: rgb(24, 23, 23);
  /*已访问的链接颜色*/
}

a:active {
  color: white;
  /*鼠标点击时的颜色*/
}

.header {
  padding: 1rem 1rem 0.69rem;
  height: 5.94rem;
}


.text {
  color: #bababa;
  line-height: 0.66rem;
}

.section {
  padding: 0.25rem 1.63rem;
  background-color: #f7ee95;
}

.space-x-52-reverse>*:not(:last-child) {
  margin-right: 3.25rem;
}</style>